﻿using Newtonsoft.Json;

namespace NotifyCenter.Sender.ResponseModels; // 建议放在单独的响应模型命名空间

/// <summary>
/// 飞书发送群消息响应体
/// </summary>
public class FeishuSendMessageResponse
{
    /// <summary>状态码（0 成功，非0 失败）</summary>
    [JsonProperty("code")]
    public int Code { get; set; }

    /// <summary>提示信息</summary>
    [JsonProperty("msg")]
    public string Message { get; set; } = string.Empty;

    /// <summary>消息ID（成功时返回）</summary>
    [JsonProperty("data")]
    public FeishuSendMessageData? Data { get; set; }

    /// <summary>快速判断是否发送成功</summary>
    [JsonIgnore]
    public bool IsSuccess => Code == 0 && Data != null;
}
